Currently, smartphone is increasingly popular and the amount of wearable device is growing rapidly; although the performance configuration of a terminal device is also continuously developing, computing performance and battery life are greatly limited when confronting with complex mobile applications. Mobile Cloud Computing (MCC) utilizes almost infinite resources of cloud to expand the capacity of a mobile device, thereby improving user experience of mobile applications and extending the power usage time of the device at the same time.
Mobile Code Offloading (MCO) is a common method in mobile cloud computing. Conventional mobile applications adopt client-server models, separate a remotely executed part of a server from a locally executed part of a terminal, and send request parameters to a could each time a task is performed remotely and wait for the execution result of the cloud. Unlike the conventional mobile applications, in MCO, when the mobile application confronts with a part with complex computing, the mobile device analyses the current context, such as current network environment, remaining battery capacity, and previous execution record, and determines whether this part of computing requires to be completed by a cloud based on the analysis result. If the current environment is not suitable for code offloading, for example, poor network conditions, this part of computing task continues to be completed locally. Otherwise, if the determination and analysis results show that offloading the code to the cloud platform for execution can be responded more rapidly and expends less power consumption, the mobile application sends the offloading request to the cloud, and sends this part of task code with a large amount of computation together with the parameters to the cloud for execution. The cloud distributes a runtime environment for this part of code to satisfy the execution requirements thereof after receiving the offloading request, generally, the cloud will provide an environment similar to the mobile operating system to execute these mobile application codes. After the computing execution is completed, the cloud will return the computing result to the terminal, the terminal will proceed with the subsequent operation execution after receiving the computing result.
At present, in order to provide the mobile operating system environment at the cloud, the cloud platform adopts a solution based on virtual machines. This solution brings additional virtual overhead since the terminal environment is simulated by virtualization via hardware, lowering the execution performance of the code inside the virtual machine. More seriously, the start cost of the virtual machine is large, when a new virtual machine is required, the cloud platform needs to install a sub-operating system in the new virtual machine and then starts it, the two operations of which are each experimental. This also means that when the offloading request is arrived, the start preparation process cannot be completed in the first place, therefore the request cannot be performed in time, causing the problem of a longer responding time of the mobile code offloading than that of local execution at a terminal. Moreover, the virtual machine occupies a lot of cloud resources, such as the occupations in memory and hard disk are significant, this solution seriously lowers the utilization rate of cloud resources.
Container technology is an operating system-level virtualization technology, unlike the additional virtualization overhead being required by hardware virtualization, container technology shares the kernel of the host operating system and expends few of computing performance, which is a lightweight resource isolation mechanism. Currently, in industry, container technology has been widely deployed in project servers, at the same time, various cloud platforms also support container technology. However, in a terminal environment structure, there is a great difference between kernels of the mobile operating system and the cloud host operating system, such that the mobile operating system cannot obtain the required functional interface from the kernel of the host operating system, which brings a significant difficult problem in executing the mobile operating system in the cloud platform system using containers. Currently, there is a lack of a solution of utilizing a container as a cloud execution environment in a scenario of mobile code offloading application.